const refundBaseInfoTemplate = `
  <el-card class="box-card">
    <div slot="header" class="clearfix">
      <span>基本信息</span>
    </div>
    <div>
    <el-form ref="form" :disabled="isDisable" label-suffix=":" :model="formData" label-width="117px" size="small">
      <el-row>
      <el-col :span="6">
        <el-form-item label="姓名" prop="name">
          <el-input v-model="formData.name" placeholder="自动识别或手动输入"></el-input>
        </el-form-item>
      </el-col>
      <el-col :span="6">
        <el-form-item label="身份证号" prop="idNum">
          <el-input v-model="formData.idNum" placeholder="自动识别或手动输入"></el-input>
        </el-form-item>
      </el-col>
      <el-col :span="6">
        <el-form-item label="性别">
          <el-select v-model="formData.gender" placeholder="请选择">
            <el-option label="男" value="男"></el-option>
            <el-option label="女" value="女"></el-option>
          </el-select>
        </el-form-item>
      </el-col>
      <el-col :span="6">
        <el-form-item label="电话" prop="phone">
          <el-input type="number" v-model="formData.phone" placeholder="请输入11位手机号"></el-input>
        </el-form-item>
      </el-col>
      </el-row>
    </el-form>
    </div>
  </el-card>
`;

Vue.component('app-refund-base-information', {
  name: 'app-refund-base-information',
  template: refundBaseInfoTemplate,
  props: ['type'],
  data() {
    return {
      limitCount: 1,
      fileDic: new Map(),
      formData: {
        name: '',
        idNum: '',
        phone: '',
        gender: '',
        // nationality: '',
        // birthday: '',
        // address: '',
        // email: '',
        // qq: '',
        // work: '',
      },
      // rules: {
      //   name: [
      //     {
      //       required: true,
      //       message: '请输入姓名',
      //     }
      //   ],
      //   idNum: [
      //     {
      //       required: true,
      //       message: '请输入身份证号码'
      //     }
      //   ],
      //   phone: [
      //     {
      //       required: true,
      //       message: '请输入电话'
      //     }
      //   ],
      // },
    }
  },
  computed: {
    isDisable() {
      return this.type === 'look';
    },
  },
  methods: {}
});